package com.zzns.service.impl;

import com.zzns.dao.jqGridDao;
import com.zzns.domain.jqInfo;
import com.zzns.service.jqGridService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * service实现类
 * Created by Mr.Object on 15/7/27.
 */
@Service
public class jqGridServiceImpl implements jqGridService {


    @Resource
    private jqGridDao jqGridDao;

    /**
     * 查询
     * @param info
     * @return
     */
    @Override
    public List<jqInfo> selectInfo(jqInfo info) {

        return jqGridDao.selectByPage(info);

    }

    /**
     * 总行数
     * @param info
     * @return
     */
    @Override
    public double selectTotalAmt(jqInfo info) {

        return jqGridDao.getTotalAmt(info);

    }

    /**
     * insert
     * @param info
     * @return
     */
    @Override
    public int insert(jqInfo info) {

        return jqGridDao.insert(info);
    }

    /**
     * update
     * @param info
     * @return
     */
    @Override
    public int update(jqInfo info) {
        return jqGridDao.update(info);
    }

    /**
     * delete
     * @param info
     * @return
     */
    @Override
    public int delete(jqInfo info) {
        return jqGridDao.delete(info.getJqId());


    }
}

